﻿<div ng-controller="xingyeAccountController">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">兴业账户管理服务</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="pull-right">
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html"
                           class="table table-striped table-bordered table-hover table-condensed">
                        <tr ng-repeat="item in $data">

                            <td data-title="'序号'" width="10%" class="text-center">{{ first + $index }}</td>
                            <td data-title="'企业id'" sortable="'enterprise_id'" class="text-center">
                                {{ item.corp_id }}
                            </td>
                            <td data-title="'企业名'" sortable="'enterprise_name'" class="text-center">
                                {{ item.enterprise_name }}
                            </td>
                           <td data-title="'开户行'" sortable="'bank_name'" class="text-center">
                                {{ item.bank_name }}
                            </td>
                            <td data-title="'账户号(卡号)'" sortable="'account_number'" class="text-center">
                                {{ item.account_number }}
                            </td>
                            <td data-title="'虚拟号'" sortable="'v_acct_no'" class="text-center">
                                {{ item.v_acct_no }}
                            </td>
                            <td data-title="'更新时间'" sortable="'bundling_time'" class="text-center">
                                {{ item.bundling_time | date:'yyyy-MM-dd' }}
                            </td>
                            <td data-title="'状态'" sortable="'status'" class="text-center">
                                <span ng-if="item.status == 0">无效</span>
                                <span ng-if="item.status == 1">正常</span>
                                <span ng-if="item.status == 2">锁定</span>
                                <span ng-if="item.status == 3">未注册</span>
                                <span ng-if="item.status == 5">待鉴定</span>
                                <span ng-if="item.status == 6">鉴定失败</span>
                            </td>                                                                                                           
                            <td class="text-center width-100 text-nowrap">
                                <button ng-if="item.status!=1" class="btn btn-info btn-xs" ng-click="deleteById(item.status,item.account_id)">
                                    <i class="fa fa-edit"></i> 删除
                                </button>
                                <button ng-if="item.status==1" class="btn btn-info btn-xs" ng-click="deleteXingyeById(item)">
                                    <i class="fa fa-edit"></i> 删除
                                </button>
                                <button ng-if="item.status == 3" class="btn btn-info btn-xs" ng-click="openAccount(item)">
                                    <i class="fa fa-edit"></i> 开户
                                </button>
                            </td>
                        </tr>
                    </table>
                </div>       
            </div>
        </div>
    </div>
</div>

